package com.share.schedule.simple.schedule;

import com.share.schedule.simple.model.dto.SfPeakSyncVehicleDetailParam;
import com.share.schedule.simple.service.SfPeakService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 顺丰高峰相关的页面数据拉取
 *
 * @author 01401061 - 孙艳强
 * @date 2021/1/31 18:49
 */
@Slf4j
@Component
public class SfPeakJob extends BaseJob {

    @Autowired
    private SfPeakService sfPeakService;

    @Override
    public String doJob() throws Exception {
        log.info("高峰数据同步-开始");
        SfPeakSyncVehicleDetailParam vehicle = new SfPeakSyncVehicleDetailParam();
        vehicle.setMotorcadeName("2021年春节高峰杭州-上海车");
        vehicle.setPageSize(120);
        vehicle.setPageNum(0);
        int status1 = sfPeakService.syncVehicleRunDetail(vehicle);

        //SfPeakSyncPlanTaskParam planTask = new SfPeakSyncPlanTaskParam();
        //int status2 = sfPeakService.syncPlanTask(planTask);
        log.info("高峰数据同步-结束");
        return null;
    }

    public void initJobCode(String jobCode) {
        super.setGetJobCode("SfPeakJob");
    }
}